cmake_minimum_required(VERSION 3.8)
project(nav_control)

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
  add_compile_options(-Wall -Wextra -Wpedantic)
endif()
include_directories(
  include
  ${Boost_INCLUDE_DIRS}
  ${JSONCPP_LIBRARIES}
)
# find dependencies
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(nav_msgs REQUIRED)
find_package(tf2_ros REQUIRED)

find_package(PkgConfig REQUIRED)
pkg_check_modules(JSONCPP jsoncpp)

#include_directories(${JSONCPP_LIBRARIES})

add_executable(nav_control src/nav_control.cpp src/graceful_controller.cpp) 
target_link_libraries(nav_control
  mosquitto
  )
ament_target_dependencies(nav_control 
  rclcpp 
  geometry_msgs 
  tf2_ros
  nav_msgs
  JSONCPP
 # mosquitto
  #${JSONCPP_LIBRARIES}
)
install(TARGETS nav_control 
  DESTINATION lib/${PROJECT_NAME})
ament_package()
